﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using treeView.SqlDb.dbModel;
using treeView.SqlDb.Implements;
using treeView.SqlDb.Services;

namespace treeView.SqlDb
{
    public class ConfigDb
    {

        public IRepository<LogOpcuaNode> LogOpcuaNodeRepository { get; private set; }
        public IRepository<ToPLCInteraceNode> ToPLCInteraceNodeRepository { get; private set; }
        public ConfigDb(DbContextOptionsBuilder<SCDBContext> OptionsBuilder)
        {
            LogOpcuaNodeRepository = new RepositoryBase<LogOpcuaNode>(OptionsBuilder.Options);
            ToPLCInteraceNodeRepository = new RepositoryBase<ToPLCInteraceNode>(OptionsBuilder.Options);
        }
    }
}
